package com.soft.orderitem;

import com.soft.dao.TOrderitemDao;
import com.soft.dao.TUserDao;
import com.soft.entity.TOrder;
import com.soft.entity.TOrderitem;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;

import java.util.List;

@SpringBootTest
@RunWith(SpringRunner.class)
public class testOrderItem {
    @Autowired
    TOrderitemDao tOrderitemDao;
    @Test
    public void test(){

//        System.out.println();
//        List<TOrderitem> list = tOrderitemDao.getOrderItemAndOrderAndProduct(4, 4);
//        System.out.println("orderItemid\torder id\tproduct id");
//        for (TOrderitem tOrderitem : list){
//            System.out.println(tOrderitem.getId()+"\t"+tOrderitem.getTOrder().getId()+"\t"+tOrderitem.getTProduct().getId());
//        }
    }
}
